package com.happymmall.service;

import com.happymmall.entity.User;

import java.sql.Connection;
import java.sql.SQLException;

public interface UserService {
    //用户登录
    public User login(String username, String password);

    //用户注册
    public int register(User user);

    //判断用户名或邮箱是否存在
    public boolean checkvalid(String str, String type);

    //获取用户的登录信息
    public User get_user_info(int id);

    //获取问题
    public String forget_get_question(String username);

    //提交问题答案
    public String forget_check_answer(String username, String question, String answer);

    //忘记密码中修改密码
    public boolean forget_resert_password(String username, String passwordNew, String forgetToken);

    //登录状态中修改密码
    public boolean reset_password(Integer id, String passwordOld, String passwordNew);

    //登录状态中更新个人信息
    public boolean update_information(String email, String phone, String question, String answer, Integer id);

}
